The present invention claims priority from Japanese Patent Application No. 10-333354 filed Nov. 10, 1998, the contents of which are incorporated herein by reference.
1. Field of the Invention
The present invention relates to a data input/output device, a data input/output method and a storage medium, and particularly to a data input/output device, a data input/output method and a storage medium which are preferably used for a copying machine, a printer, a facsimile and the like, and capable of inputting and storing a file being not definite in data size.
2. Description of Related Art
An example of conventional data input/output systems is described in Japanese Patent Publication No.Hei 4-52,923. This conventional data input/output system is composed of an input/output control part, a buffer memory, a controller, a file storage part, a memory control part and a data compression part.
A conventional data input/output system having such a composition operates in the following manner. That is to say, the system takes out file data from a file storage part and puts it into a buffer memory. At this time the data compression part performs a data compression and the like by means of conversion of the data. The input/output control part reads out file data from the buffer memory on the basis of file management information of the file storage part and writes the file data in order into an auxiliary storage.
And an example of conventional file systems each having a high-speed input/output function is described in Japanese Patent Publication No.Hei 10-114,279. This conventional file system having a high-speed input/output function is composed of a file control part, a file managing part, an input/output control part, a file storage part and an external input/output device.
A conventional file system having such a high-speed input/output function operates in the following manner. That is to say, in case of writing data from an input/output device into a file storage part, an input/output control part analyzes and writes file information of a file generated in advance into the data area of the file.
For example, in case of a copying machine, since its output (print out) method is determined in advance, the machine determines in advance a storage area to have copy data written and determines in advance an engagement of writing scanned data directly into the storage area. And when data is written into that storage area, the machine automatically prints out the data. By doing this it is possible to speed up a copying operation.
However, these prior arts have the following problems. The first problem is that in case of writing data in a file generated in a file storage part from an input/output device and the like, the data can be written only up to the file capacity of an already generated file. The reason is that a file control part cannot change the size of a file according to the size of data to be written when writing the data from an input/output device and the like into a file storage part.
The second problem is that in case of writing data in a file generated in a file storage part from an input/output device and the like, the size of data to be written must be definite. The reason is that in case of writing data from an input/output device into a file storage part, the file control part cannot compress the data to be written or change the size of a file.
In consideration of such circumstances, the present invention has been performed and makes it possible to write file data having an optional size.
According to the first aspect of the present invention, it provides a data input/output device having a function which makes a controller for performing input/output control store file data directly into a storage part for storing file data, wherein in order to write file data into the storage part the controller is provided with an area securing means for securing an area having a specified size in the storage part, a detecting means for detecting the starting address of an area of the storage part secured by the area securing means and a writing means for writing file data from the starting address detected by the detecting means, and when the size of file data is larger than the size of the area the area securing means secures the next area for writing the rest of the file data and the detecting means detects the starting address of the next area, and the writing means writes the rest of the file data from the starting address of the next area.
The area securing means can secure areas one cluster portion by one cluster portion. The writing means can write file data into areas one cluster portion by one cluster portion. The invention further comprises a comparing means for comparing the size of file data to be written into the storage part by the writing means and the size of an area secured in the storage part by the area securing means with each other, and the area securing means can secure the next area in the storage part according to a result of comparison by the comparing means. It is possible that the storage part is composed of a first portion for storing file data and a second portion for storing attribute information of file data, the detecting means detects the starting address of file data from the attribute information stored in the second portion, and the writing means writes file data from the starting address into the first portion. It is possible that a reading means for reading specified file data stored in the storage part is further provided, the detecting means detects the starting address of an area where the file data to be read by the reading means is stored and, when the file data is stored in a plurality of areas, detects in order the starting addresses of the subsequent areas to that area, and the reading means reads the file data from the starting address detected by the detecting means.
According to the second aspect of the present invention, it provides a data input/output method in a data input/output device having a function which makes a controller for performing input/output control store file data directly into a storage part for storing file data, wherein in order to write file data into the storage part the controller is provided with an area securing step of securing an area having a specified size in the storage part, a detecting step of detecting the starting address of an area of the storage part secured by the area securing step and a writing step of writing file data from the starting address detected by the detecting step, and when the size of file data is larger than the size of an area the area securing step secures the next area for writing the rest of the file data and the detecting step detects the starting address of the next area, and the writing step writes the rest of the file data from the starting address of the next area.
The scope of claims of the present invention includes a storage medium for storing a program capable of performing such a data input/output method.
In a data input/output device, a data input/output method and a storage medium according to the present invention, in order to write file data into the storage part, an area having a specified size is secured in a storage part, the starting address of the area secured in the storage part is detected, and the file data is written from the detected starting address. And when the size of file data is larger than the size of a secured area, the next area for writing the rest of the file data is secured and the starting address of the next area is detected, and the rest of the file data is written from the starting address of the detected next area.